<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<style>
a{
background:yellow;
}
p{
  border:1px solid red;
  margin:20px;
  background:pink;
}
</style>
<script type="text/javascript">
  $(document).ready(function(){
    
    //$('p').click(function(){
    $('a').click(function(){
      var txt = $(this).html();
      alert(txt);
    });
  });
</script>

<p><a href="#">Click Here 1</a></p>
<p><a href="#">Click Here 2</a></p>
<p><a href="#">Click Here 3</a></p>
<p><a href="#">Click Here 4</a></p>
<p><a href="#">Click Here 5</a></p>